<?php
class fieldtype {
	
	public $view;
	public $type;
	
	function __construct($data) {
		foreach($data as $key => $value) {
			$this->$key = $value;
		}
	}
	
	function render($data) {
		request::set("field", $this);
		request::set("data", $data);
		$req = new request(array("module" => "fieldtype", "action" => $this->type."/".$this->view));
		module::load($req);
	}
	
}
?>